<template>
	<view class="app">
		<view class="baocnter" v-for="(item, index) in ALineOfaColumn" :key="index" @click="theCurrent(item)">
			<view class="img">
				<!-- <image :src="item.pic" mode=""></image> -->
				<u-image width="100%" height="100%" :src="item.pic">
					<u-loading slot="loading"></u-loading>
				</u-image>
				<text>{{ item.duration }}</text>
			</view>
			<view class="msg">
				<view class="txt" v-html="item.title"></view>
				<view class="cloors upbox">
					<text class="up">up</text>
					{{ item.author || item.owner.name }}
				</view>
				<view class="cloors tanmu">
					<u-icon name="play-circle"></u-icon>{{ item.favorites || item.stat.view | unitConverter }}
					<u-icon name="more-circle"></u-icon>{{ item.video_review || item.stat.danmaku | unitConverter }}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'ALineOfaColumn',
		data() {
			return {
				list: [],
			};
		},
		props: {
			ALineOfaColumn: '',
		},
		watch: {
			ALineOfaColumn(newVal, val) {},
		},
		methods: {
			theCurrent(data) {
				this.$emit('ALineOfaColumnFunc', data);
			},
		},
	};
</script>

<style scoped lang="less">
	.baocnter {
		width: 96vw;
		height: 15vh;
		display: flex;
		margin: auto;
		padding: 8rpx;

		.img {
			width: 40%;
			background: #a0cfff;
			position: relative;

			image {
				width: 100%;
				height: 100%;
			}

			text {
				position: absolute;
				color: #ffffff;
				background-color: rgba(0, 0, 0, 0.3);
				border-radius: 5rpx;
				bottom: 0px;
				right: 0px;
				// background: hsl(0deg 0% 100% / 57%);
			}
		}

		.msg {
			.cloors {
				color: #999;
			}

			width: 60%;
			margin: 8rpx;

			.txt {
				overflow: hidden;
				text-overflow: ellipsis;
				font-size: 3.73333vw;
				font-weight: 600;
				max-height: 60%;
				min-height: 30%;

				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				line-height: 36rpx;
				overflow: hidden;
			}

			.up {
				border: 1px solid #999;
				border-radius: 10rpx;
			}

			.upbox {
				min-height: 30%;
				max-height: 40%;
			}

			.tanmu {
				min-height: 30%;
				max-height: 40%;
			}
		}
	}
</style>
